home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Form1
- Caption = "Form1"
- ClientHeight = 3195
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 5685
- LinkTopic = "Form1"
- ScaleHeight = 3195
- ScaleWidth = 5685
- StartUpPosition = 3 'Windows Default
- Begin VB.Frame frameCase
- Caption = "Case"
- Height = 1215
- Left = 120
- TabIndex = 10
- Top = 720
- Width = 1815
- Begin VB.OptionButton OptCase
- Caption = "lower case"
- Height = 195
- Index = 2
- Left = 240
- TabIndex = 13
- Top = 840
- Width = 1335
- End
- Begin VB.OptionButton OptCase
- Caption = "Title Case"
- Height = 195
- Index = 0
- Left = 240
- TabIndex = 12
- Top = 360
- Value = -1 'True
- Width = 1215
- End
- Begin VB.OptionButton OptCase
- Caption = "UPPER CASE"
- Height = 195
- Index = 1
- Left = 240
- TabIndex = 11
- Top = 600
- Width = 1455
- End
- End
- Begin VB.TextBox txtUnit
- Enabled = 0 'False
- Height = 285
- Left = 4080
- TabIndex = 8
- Text = "Cent"
- Top = 1080
- Width = 1455
- End
- Begin VB.TextBox txtCurrencyType
- Enabled = 0 'False
- Height = 285
- Left = 2520
- TabIndex = 6
- Text = "Dollar"
- Top = 1080
- Width = 1455
- End
- Begin VB.CheckBox chkUseCurrency
- Caption = "Use Currency"
- Height = 255
- Left = 2520
- TabIndex = 5
- Top = 360
- Width = 1815
- End
- Begin VB.TextBox txtWords
- Height = 285
- Left = 0
- TabIndex = 3
- Top = 2280
- Width = 5535
- End
- Begin VB.TextBox txtNumber
- Height = 285
- Left = 120
- TabIndex = 1
- Text = "100.15"
- Top = 360
- Width = 1815
- End
- Begin VB.CommandButton cmdConvert
- Caption = "Convert to Words"
- Height = 495
- Left = 3360
- TabIndex = 0
- Top = 2640
- Width = 2175
- End
- Begin VB.Label Label4
- Caption = "Unit"
- Height = 255
- Left = 4080
- TabIndex = 9
- Top = 720
- Width = 1095
- End
- Begin VB.Label Label3
- Caption = "Currency"
- Height = 255
- Left = 2520
- TabIndex = 7
- Top = 720
- Width = 1095
- End
- Begin VB.Label Label2
- Caption = "Words:"
- Height = 255
- Left = 0
- TabIndex = 4
- Top = 2040
- Width = 1215
- End
- Begin VB.Label Label1
- Caption = "Number:"
- Height = 255
- Left = 120
- TabIndex = 2
- Top = 120
- Width = 1215
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub chkUseCurrency_Click()
- If chkUseCurrency.Value = Checked Then
- txtCurrencyType.Enabled = True
- txtUnit.Enabled = True
- txtCurrencyType.Enabled = False
- txtUnit.Enabled = False
- End If
- End Sub
- Private Sub cmdConvert_Click()
- 'Create an new instance of the dll
- Dim obj As New ConvertNum.NumtoText
- Dim m_UseCurrency As Boolean
- Dim m_CurrencyType As String
- Dim m_CurrencyUnit As String
- Dim m_Value As String
- Dim sCase As String
- If chkUseCurrency.Value = Checked Then
- m_UseCurrency = True
- m_CurrencyType = txtCurrencyType.Text
- m_CurrencyUnit = txtUnit.Text
- m_UseCurrency = False
- m_CurrencyType = ""
- m_CurrencyUnit = ""
- End If
- If OptCase(0).Value = True Then sCase = "Title"
- If OptCase(1).Value = True Then sCase = "Upper"
- If OptCase(2).Value = True Then sCase = "Lower"
- m_Value = txtNumber.Text
- 'Call procedure and convert
- txtWords.Text = obj.fchange(m_Value, sCase, m_UseCurrency, m_CurrencyType, m_CurrencyUnit)
- End Sub
- Private Sub Form_Resize()
- txtWords.Width = Form1.Width - 200
- cmdConvert.Left = Form1.Width - (cmdConvert.Width + 200)
- End Sub
-